// Function for loading the user's settings
function loadCfg() {
    // If no configuration exists, set the settings to their defaults
    if (localStorage["copyLink"] == undefined || localStorage["showQr"] == undefined || localStorage["altIcon"] == undefined) {
        localStorage["copyLink"] = true;
        localStorage["showQr"] = true;
        localStorage["altIcon"] = false;
    }

    // Get the user's current settings
    copyLink = toBool(localStorage["copyLink"]);
    showQr = toBool(localStorage["showQr"]);
    altIcon = toBool(localStorage["altIcon"]);
}

// Function necessary for getting a boolean out of local storage
function toBool(str)
{
     if ("false" === str)
        return false;
     else 
        return str;
}